<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: fulei.yang
  Date: 2017/10/25
  Time: 上午11:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page isELIgnored="false" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="common/common.jsp" %>

<html>
<head>
    <style type="text/css">
        .col-sm-10 {
            margin-left: 10%;
        }

        .goods-img {
            width: 100%;
            height: 20%;
        }
    </style>
</head>
<body>
<%@include file="common/header.jsp" %>
<div class="container" id="goodscontainer">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="jumbotron">
                <h1>
                    淘乐乐优惠券搜索网
                </h1>
                <p>
                    这是一个让你搜索优惠券的网站！搜购物券在购物！省的不行不行的！
                </p>
                <p>
                    <%--<a class="btn btn-primary btn-large" href="javascript:modal()">了解更多</a>--%>
                    <!-- Button trigger modal -->
                    <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
                        了解更多
                    </button>
                </p>
            </div>
        </div>
    </div>
    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
        <c:forEach items="${goods}" var="good">
            <div class="col-xs-2 col-sm-2 col-md-2 col-lg-2">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title"><c:out value="${good.goodsName}"/></h3>
                    </div>
                    <div class="panel-body">
                        <img src="<c:out value="${good.goodsImg}"/> " class="goods-img">
                        <div><p>
                            商品价格:<c:out value="${good.goodsPrice}"/> 元
                            <br>
                            优惠券链接：<a href="<c:out value="${good.coupon.couponGoodsUrl}"/>">点我领取优惠券</a>
                        </p></div>
                    </div>
                </div>
            </div>
        </c:forEach>
    </div>
</div>
<%@include file="common/footer.jsp" %>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">淘乐乐说明</h4>
            </div>
            <div class="modal-body">
                <p>领取优惠券，消费更优惠！</p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>
</body>
</html>
